<h2>User Management</h2>
<div>
	<div style="width:100%;">
		<div style="float: left;width:45%;">
			Select Site: <select id="userList" onchange="selectChange()"><option>Loading...</option></select>
		</div>
		<div style="float:right;width:45%;" id="statusBox">
			--
		</div>
	</div>
	<br />
	<hr>
	<div id="editUser" style="display:none;width:100%;">
		<div id="userInfo" style="float: left;">
			<h3>User Setup</h3>
			<table>
				<tr><td>Displayed Name</td><td><input id="FLD_displayname" class="datafield"></td></tr>
				<tr><td>Username</td><td><input id="FLD_user" class="datafield"></td></tr>
				<tr><td>Password</td><td><input type="password" id="FLD_password" class="datafield"></td></tr>
				<tr><td>Role</td><td><select id="FLD_role" class="datafield"></select></td></tr>
				<tr><td><input type="button" value=" Delete User " class="datafield" onclick="removeRecord();"></td><td align="right"><input type="button" value=" Save User " onclick="saveData()"></td></tr>
			</table>
			<input type="hidden" id="FLD_id" class="datafield">
		</div>
		<div id="sitePages" style="float:right; width:450px;">
			<h3>User Pages</h3>
			<table cellpadding="3" cellspacing="0">
				<tr><td>Sites</td><td><select id="siteList" onchange="listSitePages();"></select></td></tr>
				<tr><td>Pages</td><td><select id="pageList"></select></td></tr>
				<tr><td align="right" colspan="2"><input type="button" value="Add Page" onclick="addPage()"></td></tr>
			</table>
			<h4>Active Pages for User</h4>			
			<table id="activePages" width="100%">
				<thead>
					<tr><td>Site</td><td>Page</td><td>&nbsp;</td></tr>
				</thead>
				<tbody></tbody>
			</table>
			
		</div>
	</div>
</div>

<script>
	// Language Definitions
	var removeRecordText="Are you sure you wish to DELETE this user?";
	var saveConfirmText="Are you sure you wish to save this user?";
	var addNewUser="Add New User...";
	var chooseUser="Choose User";
	var chooseSite="Choose Site";
	var addPageText="Are you sure you want to add this page to this user?";
	var removePageText="Are you sure you want to DELETE this page from this user?";
	var deletePageText="[Delete]";
	var loadingMessage='Loading...';
	var adminRoleName='Administrator';
	var editorRoleName='Editor';
	// Used to place ajax loader instead of images.
	if(typeof(ajaxLoader) != 'undefined'){
		loadingMessage=ajaxLoader;
	}
</script>
